package com.yfht.framework.base.dao;

import java.io.Serializable;
import java.sql.Connection;
import java.util.List;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.orm.ibatis.SqlMapClientTemplate;

public interface IMultiDAO {
	 public Connection getConnection();

	  public JdbcTemplate getJdbcTemplate();

	  public HibernateTemplate getHibernateTemplate();

	  public SqlMapClientTemplate getSqlMapClientTemplate();

	  /**hibernate 相关操作 **/
	  public Object findByID_Hibernate_Load(Class clazz, Serializable ID);
	  public Object findByID_Hibernate_Get(Class clazz, Serializable ID);
	  public Object findByID_Hibernate_NamedQuery(String hql, Serializable ID);
	  /*
	  public Object findByID_Hibernate_ComposedHQL(String hql, Serializable ID);*/
	  public List findAll_Hibernate_Object(Class clazz);
	  public List findByExample_Hibernate(Object exampleObj);
	  public List findByExample_Hibernate(Object exampleObj, int startIndex, int maxResults);
	  public List findByHQL_Hibernate(String hql);
	  public List findByHQL_Hibernate(String hql,Object...param);
	  public List findByHQL_Hibernate(final String hql, final int startIndex, final int maxResults);
	  public List findByHQL_Hibernate(final String hql, final int startIndex, final int maxResults, final Object [] paramArrayOfObject);
	  public String formateCountHQL(String hql);
	  public void save_Hibernate_Object(Object object);
	  public void update_Hibernate_Object(Object object);
	  public void delete_Hibernate_Object(Object object);
	  public void deleteByID_Hibernate_Object(Class clazz, Serializable ID);
	  public void bulkUpdate(String hql);
	  public void bulkUpdate(String hql, Object paramObject);
	  public void bulkUpdate(String hql, Object[] paramArrayOfObject);
	  
	  /** jdbc 相关操作 **/
	  public void delete_JDBC(String sql);
	  public void update_JDBC(String sql);
	  public List findAll_JDBC(String sql);
	  public List findAll_JDBC(String sql, Object... param);

	  /** ibatis 相关操作 采用sshi的设计方式时候使用 待完成状态 **/
	  /*
	  public void update_iBatis(String paramString, Object paramObject);
	  public List findAll_iBatis(String paramString);
	  public List find_iBatis(String paramString, Object paramObject, int paramInt1, int paramInt2);
	  public List find_iBatis(String paramString, Object paramObject);*/
}
